getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Sat, 10 Aug 2019 18:58:18 +0000 (19:58 +0100)
committerRyan Tandy <ryan@nardis.ca>
Sat, 10 Aug 2019 18:58:18 +0000 (19:58 +0100)
commit6c4fdd9dffe3af720b91f541a99e9765bd2f1a7c
tree0986a84f2539d75f6099ec0e9ec3e12a3ac741d3
parentb16baf0ab0d96a906e95370cae9ba76a50474eda
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c